unit UntPrincipal;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls, ComCtrls;

type
  TFrmPrincipal = class(TForm)
    Button1: TButton;
    Panel1: TPanel;
    procedure Button1Click(Sender: TObject);
  private

  public

  end;

var
  FrmPrincipal: TFrmPrincipal;

implementation

uses Unit2;

{$R *.dfm}

procedure TFrmPrincipal.Button1Click(Sender: TObject);
var Form2: TForm2;
begin
  Form2 := TForm2.Create(Self);
  Form2.DragKind := dkDock;
  Form2.DragMode := dmManual;
  Form2.UseDockManager := True;
  Form2.ManualDock(Panel1);
  Form2.show;
  Panel1.Visible := true;
end;

end.
